package com.xd.springboot.jms;

import com.xd.springboot.config.MQConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Service;

@Service
public class QueueConsumer {

    private  static  final Logger log= LoggerFactory.getLogger(QueueConsumer.class);

    //监听目标
    @JmsListener(destination = MQConfig.QUEUE_NEME)
    public  void receiveQueueMsg(String msg)
    {
        log.info("监听到队列中有消息过来,消费"+msg);
    }
}
